package dk.gavdi.presentation;


import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class MenuActivity extends Activity {
	
	private Bundle extras;
	private Button btnTimeReg;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_menu);
        
        btnTimeReg = (Button) findViewById(R.id.btnTimeReg);
		extras = new Bundle();
		extras = getIntent().getExtras();

		btnTimeReg.setOnClickListener(new View.OnClickListener() {

			public void onClick(View v) {
				Intent intent = new Intent(getBaseContext(), RegistrationActivity.class);		
				intent.putExtras(extras);
				startActivity(intent);
			}
		});
		
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_menu, menu);
        return true;
    }
    
	@Override 
	public boolean onKeyDown(int keyCode, KeyEvent event) { 
	    if (keyCode == KeyEvent.KEYCODE_BACK) { 
			Intent intent = new Intent(getBaseContext(),LoginActivity.class);
			startActivity(intent);
	        return true; 
	    } 
	    return super.onKeyDown(keyCode, event); 
	} 
}
